//
//  InvitationView.m
//  LStyle
//
//  Created by Obaid Abdul Maroof on 12/16/09.
//  Copyright 2009 Vrije University. All rights reserved.
//

#import "InvitationView.h"


@implementation InvitationView

/*
 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
    }
    return self;
}
*/


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
	
	[txtName setBorderStyle:0];
	[txtEmail setBorderStyle:0];
	[txtMsg1 setBorderStyle:0];
	UIFont *fnt = txtMsg1.font;
	fnt = [fnt fontWithSize:16];
	txtMsg.font = fnt;
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 
	NSSet *allTouches = [event allTouches];
	
	//Get the first touch.
	UITouch *touch = [[allTouches allObjects] objectAtIndex:0];
	
	if (touch.view != txtName && touch.view != txtEmail && touch.view != txtMsg1 && touch.view != txtMsg){
		if ([txtName isFirstResponder])
			[txtName resignFirstResponder];
		if ([txtEmail isFirstResponder])
			[txtEmail resignFirstResponder];
		if ([txtMsg isFirstResponder])
			[txtMsg resignFirstResponder];
		if ([txtMsg1 isFirstResponder])
			[txtMsg1 resignFirstResponder];
	}
}
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


-(void)Back:(id)sender{
	[self.navigationController popViewControllerAnimated:YES];
}
@end
